package com.mydemo.sftp.config;

import com.mydemo.sftp.SftpProperty;
import com.mydemo.sftp.SftpProvider;
import com.mydemo.sftp.SftpProviderImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SftpConfig {

    @Autowired
    private SftpProperty sftpProperty;

    @Bean
    public SftpProvider sftpProvider(){
        SftpProviderImpl sftpProvider = new SftpProviderImpl();
        sftpProvider.setSftpProperty(sftpProperty);
        return sftpProvider;
    }
}
